package com.breadenglish.cms.api.app.gateway.componet;

import com.breadenglish.cms.api.app.gateway.util.NumberFormatUtil;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.InitBinder;

/**
 * Created by jiangkun on 15/12/15.
 */
@ControllerAdvice(basePackages = {"com.breadenglish.controller"} )
public class GlobalBindingInitializer {

    @InitBinder
    public void initBinder(WebDataBinder binder) {
        NumberFormatUtil.registerAllFormat(binder);
    }
}
